#!/bin/bash

#1. 判断参数个数
if [ $# -lt 1 ]
then
    echo Not Enough Arguement!
    exit;
fi

cmd=$1

#2. 遍历集群所有机器
for host in server101 server102 server103 server104 
do
    echo ====================  $host  ====================
    #3. 遍历所有目录，挨个发送
	ssh $host $cmd
done
